package com.nt.train.config.properties;
import com.nt.train.dto.Pet;
import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author hlf
 * @version 1.0
 * @date 2022/8/9 13:50
 */
@PropertySource(value = {"classpath:person.properties"})
// @PropertySource(value = {"classpath:person.yaml"})
@Component
@ConfigurationProperties(prefix = "person")
@Data
public class Person4 {

    private String lastName;

    private Integer age;

    private Boolean boss;

    private Date birth;

    private Map<String, Object> maps;

    private List<Object> list;

    private Pet pet;

//    @Value("${person.last-name}")
//    private String lastName;
//    @Value("#{11*2}")
//    private Integer age;
//    @Value("false")
//    private Boolean boss;
//    @Value("${person.birth}")
//    private Date birth;

}
